home *** CD-ROM | disk | FTP | other *** search
/ Nebula 2 / Nebula Two.iso / Drivers / ATIMach32PCI / ATI_reloc.tproj / ATIModes.c < prev    next >
Text File  |  1994-08-03  |  7KB  |  173 lines

  1. /* Copyright (c) 1992, 1993 NeXT Computer, Inc.  All rights reserved. 
  2.  *
  3.  * ATIModes.c - Mode definitions for the ATi display driver.
  4.  *
  5.  * HISTORY
  6.  * 07 Oct 92    Joe Pasqua
  7.  *      Created. 
  8.  * 01 June 93    Mike Paquette
  9.  *    Rewrite: Convert from Corsair device driver to general MACH32 chipset
  10.  *         driver. Add support for multiple DACs and CRT setups.
  11.  *        Add 8 bit monochrome support.  Add support for non-Cosair
  12.  *        implementations.
  13.  *  7 July 1993    Derek B Clegg
  14.  *    Cleaned up for external release.
  15.  */
  16. #import "ATIModes.h"
  17.  
  18. const ATI_DACSetup ATI_DAC_Setup_15BPP = {
  19.     0, 1, 0x0d, 0x402A, 0x00, 0x03, 0xA0, IO_15BitsPerPixel
  20. };
  21.  
  22. const ATI_DACSetup ATI_DAC_Setup_8BPP = {
  23.     0, 0x30, 0x2d, 0x401A, 0xFF, 0x03, 0x00, IO_8BitsPerPixel
  24. };
  25.  
  26. /* 800 x 600, 60Hz, noninterlaced for slow/double clocked DACS (Bt481,ATT491)
  27.  * Note that this programs an 80 MHz dot clock, the current maximum. */
  28. static const ATI_CRTCSetup ATI_crt_800_60_SlowDAC = {
  29.     800, 600, 0x83, 0x63, 0x68, 0x10, 0x4E3, 0x4ab, 0x4B0, 0x04, 0x23,
  30.     0x062C, 0,
  31. };
  32.  
  33. /* 1024 x 768, 60Hz, noninterlaced for slow/double clocked DACS (Bt481,ATT491)
  34.  * Note that this programs an 80 MHz dot clock, the current maximum. */
  35. static const ATI_CRTCSetup ATI_crt_1024_60_SlowDAC = {
  36.     1024, 768, 0xa7, 0x7f, 0x85, 0x08, 0x63B, 0x5ff, 0x600, 0x04, 0x23,
  37.     0x062C, 0,
  38. };
  39.  
  40. /* 800 x 600, 72Hz, noninterlaced. */
  41. static const ATI_CRTCSetup ATI_crt_800_72 = {
  42.     800, 600, 0x82, 0x63, 0x6A, 0x0F, 0x537, 0x4ab, 0x4F8, 0x06, 0x23,
  43.     0x0610, 0,
  44. };
  45.  
  46. /* 800 x 600, 60Hz, noninterlaced. */
  47. static const ATI_CRTCSetup ATI_crt_800_60 = {
  48.     800, 600, 0x83, 0x63, 0x68, 0x10, 0x4E3, 0x4ab, 0x4B0, 0x04, 0x23,
  49.     0x0630, 0,
  50. };
  51.  
  52. /* 1024 x 768, 60Hz, noninterlaced. */
  53. static const ATI_CRTCSetup ATI_crt_1024_60 = {
  54.     1024, 768, 0xa7, 0x7f, 0x85, 0x08, 0x63B, 0x5ff, 0x600, 0x04, 0x23,
  55.     0x063C, 0,
  56. };
  57.  
  58. /* 1024 x 768, 76Hz, noninterlaced. */
  59. static const ATI_CRTCSetup ATI_crt_1024_76 = {
  60.     1024, 768, 0xa2, 0x7f, 0x87, 0x0B, 0x64A, 0x5ff, 0x60B, 0x04, 0x23,
  61.     0x062c, 0,
  62. };
  63.  
  64. /* 1024 x 768, 72Hz, noninterlaced. */
  65. static const ATI_CRTCSetup ATI_crt_1024_72 = {
  66.     1024, 768, 0xa1, 0x7f, 0x82, 0x10, 0x649, 0x5ff, 0x602, 0x26, 0x23,
  67.     0x0638, 0,
  68. };
  69.  
  70.  
  71. /* 1120 x 832, 60Hz, noninterlaced. */
  72. static const ATI_CRTCSetup ATI_crt_1120_60 = {
  73.     1120, 832, 0xAB, 0x8B, 0x91, 0x0C, 0x6E8, 0x67F, 0x685, 0x0C, 0x23,
  74.     0x0638, 0,
  75. };
  76.  
  77. /* 1120 x 832, 68Hz, noninterlaced. */
  78. static const ATI_CRTCSetup ATI_crt_1120_68 = {
  79.     1120, 832, 0xAB, 0x8B, 0x91, 0x0C, 0x6C8, 0x67F, 0x681, 0x06, 0x23,
  80.     0x062C, 0,
  81. };
  82.  
  83. /* 1280 x 1024, 60Hz, noninterlaced. */
  84. static const ATI_CRTCSetup ATI_crt_1280_60 = {
  85.     1280, 1024, 0xD6, 0x9f, 0xA9, 0x2E, 0x852, 0x7ff, 0x800, 0x25, 0x23,
  86.     0x0628, 1,
  87. };
  88.  
  89. #if 1
  90.  
  91. /* These values are provided for reference only.  Current DACs exhibit
  92.  * instability when driven at these high rates. */
  93.  
  94. /* 1280 x 1024, 74Hz, noninterlaced. */
  95. static const ATI_CRTCSetup ATI_crt_1280_74 = {
  96.     1280, 1024, 0xD5, 0x9f, 0xA3, 0x12, 0x84B, 0x7ff, 0x7FF, 0x05, 0x23,
  97.     0x0620, 1,
  98. };
  99.  
  100. /* 1280 x 1024, 70Hz, noninterlaced. */
  101. static const ATI_CRTCSetup ATI_crt_1280_70 = {
  102.     1280, 1024, 0xD2, 0x9f, 0xA9, 0x0E, 0x851, 0x7ff, 0x800, 0x05, 0x23,
  103.     0x0604, 1,
  104. };
  105.  
  106. #endif
  107.  
  108. const IODisplayInfo ATIMode[] = {
  109.     {  800, 600, 800, 1600, 72, 0, IO_15BitsPerPixel, IO_RGBColorSpace,
  110.     "-RRRRRGGGGGBBBBB", 0, (void *)&ATI_crt_800_72 },
  111.     {  800, 600, 800, 1600, 60, 0, IO_15BitsPerPixel, IO_RGBColorSpace,
  112.     "-RRRRRGGGGGBBBBB", 0, (void *)&ATI_crt_800_60 },
  113.     { 1024, 768, 1024, 2048, 76, 0, IO_15BitsPerPixel, IO_RGBColorSpace,
  114.     "-RRRRRGGGGGBBBBB", 0, (void *)&ATI_crt_1024_76 },
  115.     { 1024, 768, 1024, 2048, 72, 0, IO_15BitsPerPixel, IO_RGBColorSpace,
  116.     "-RRRRRGGGGGBBBBB", 0, (void *)&ATI_crt_1024_72 },
  117.     { 1024, 768, 1024, 2048, 60, 0, IO_15BitsPerPixel, IO_RGBColorSpace,
  118.     "-RRRRRGGGGGBBBBB", 0, (void *)&ATI_crt_1024_60 },
  119.     { 1120, 832, 1120, 2240, 68, 0, IO_15BitsPerPixel, IO_RGBColorSpace,
  120.     "-RRRRRGGGGGBBBBB", 0, (void *)&ATI_crt_1120_68 },
  121.     { 1120, 832, 1120, 2240, 60, 0, IO_15BitsPerPixel, IO_RGBColorSpace,
  122.     "-RRRRRGGGGGBBBBB", 0, (void *)&ATI_crt_1120_60 },
  123.     { 1280, 1024, 1280, 2560, 74, 0, IO_15BitsPerPixel, IO_RGBColorSpace,
  124.     "-RRRRRGGGGGBBBBB", 0, (void *)&ATI_crt_1280_74 },
  125.     { 1280, 1024, 1280, 2560, 70, 0, IO_15BitsPerPixel, IO_RGBColorSpace,
  126.     "-RRRRRGGGGGBBBBB", 0, (void *)&ATI_crt_1280_70 },
  127.     {  800, 600, 800, 800, 72, 0, IO_8BitsPerPixel, IO_OneIsWhiteColorSpace,
  128.     "WWWWWWWW", 0, (void *)&ATI_crt_800_72 },
  129.     {  800, 600, 800, 800, 60, 0, IO_8BitsPerPixel, IO_OneIsWhiteColorSpace,
  130.     "WWWWWWWW", 0, (void *)&ATI_crt_800_60 },
  131.     { 1024, 768, 1024, 1024, 76, 0, IO_8BitsPerPixel, IO_OneIsWhiteColorSpace,
  132.     "WWWWWWWW", 0, (void *)&ATI_crt_1024_76 },
  133.     { 1024, 768, 1024, 1024, 72, 0, IO_8BitsPerPixel, IO_OneIsWhiteColorSpace,
  134.     "WWWWWWWW", 0, (void *)&ATI_crt_1024_72 },
  135.     { 1024, 768, 1024, 1024, 60, 0, IO_8BitsPerPixel, IO_OneIsWhiteColorSpace,
  136.     "WWWWWWWW", 0, (void *)&ATI_crt_1024_60 },
  137.     { 1120, 832, 1120, 1120, 68, 0, IO_8BitsPerPixel, IO_OneIsWhiteColorSpace,
  138.     "WWWWWWWW", 0, (void *)&ATI_crt_1120_68 },
  139.     { 1120, 832, 1120, 1120, 60, 0, IO_8BitsPerPixel, IO_OneIsWhiteColorSpace,
  140.     "WWWWWWWW", 0, (void *)&ATI_crt_1120_60 },
  141.     { 1280, 1024, 1280, 1280, 60, 0, IO_8BitsPerPixel, IO_OneIsWhiteColorSpace,
  142.     "WWWWWWWW", 0, (void *)&ATI_crt_1280_60 },
  143. };
  144.  
  145. const int ATIModeCount = (sizeof(ATIMode)/sizeof(ATIMode[0]));
  146.  
  147. const IODisplayInfo ATISlowDACMode[] = {
  148.     {  800, 600, 800, 1600, 60, 0, IO_15BitsPerPixel, IO_RGBColorSpace,
  149.     "-RRRRRGGGGGBBBBB", 0, (void *)&ATI_crt_800_60_SlowDAC },
  150.     {  1024, 768, 1024, 2048, 60, 0, IO_15BitsPerPixel, IO_RGBColorSpace,
  151.     "-RRRRRGGGGGBBBBB", 0, (void *)&ATI_crt_1024_60_SlowDAC },
  152.     {  800, 600, 800, 800, 72, 0, IO_8BitsPerPixel, IO_OneIsWhiteColorSpace,
  153.     "WWWWWWWW", 0, (void *)&ATI_crt_800_72 },
  154.     {  800, 600, 800, 800, 60, 0, IO_8BitsPerPixel, IO_OneIsWhiteColorSpace,
  155.     "WWWWWWWW", 0, (void *)&ATI_crt_800_60 },
  156.     { 1024, 768, 1024, 1024, 76, 0, IO_8BitsPerPixel, IO_OneIsWhiteColorSpace,
  157.     "WWWWWWWW", 0, (void *)&ATI_crt_1024_76 },
  158.     { 1024, 768, 1024, 1024, 72, 0, IO_8BitsPerPixel, IO_OneIsWhiteColorSpace,
  159.     "WWWWWWWW", 0, (void *)&ATI_crt_1024_72 },
  160.     { 1024, 768, 1024, 1024, 60, 0, IO_8BitsPerPixel, IO_OneIsWhiteColorSpace,
  161.     "WWWWWWWW", 0, (void *)&ATI_crt_1024_60 },
  162.     { 1120, 832, 1120, 1120, 68, 0, IO_8BitsPerPixel, IO_OneIsWhiteColorSpace,
  163.     "WWWWWWWW", 0, (void *)&ATI_crt_1120_68 },
  164.     { 1120, 832, 1120, 1120, 60, 0, IO_8BitsPerPixel, IO_OneIsWhiteColorSpace,
  165.     "WWWWWWWW", 0, (void *)&ATI_crt_1120_60 },
  166.     { 1280, 1024, 1280, 1280, 60, 0, IO_8BitsPerPixel, IO_OneIsWhiteColorSpace,
  167.     "WWWWWWWW", 0, (void *)&ATI_crt_1280_60 },
  168.  
  169. };
  170.  
  171. const int ATISlowDACModeCount =
  172.     (sizeof(ATISlowDACMode)/sizeof(ATISlowDACMode[0]));
  173.